-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Ingest server #370
Draft
stevekeay
wants to merge
37
commits into
main
Choose a base branch
from
ingest-server
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: Ingest server #370
+3,889
−14
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This duplicates some existing code which will be cleaned up later The intention is to consolidate multiple steps in a single python script, to simplify information sharing.
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
cardoe
reviewed
Oct 10, 2024
from understack_workflows.bmc import Bmc | ||
from understack_workflows.helpers import setup_logger | ||
|
||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be here.
We ignore items that already exist in nautobot
This stops the logging lines like: 2024-10-17 09:48:09,792 - urllib3.connectionpool - DEBUG - https://10.46.96.156:443 "GET /redfish/v1/Systems/System.Embedded.1/EthernetInterfaces/NIC.Integrated.1-2 HTTP/1.1" 200 475 2024-10-17 09:48:09,801 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): 10.46.96.156:443
ideally this would fetch the actual hardware type but that requires an additional api call and maybe this will all get replaced with sushy calls anyhow so I am keeping it simple for now.
stevekeay
force-pushed
the
ingest-server
branch
from
October 22, 2024 15:05
7889d10
to
97a7c5c
Compare
We are using nexus switches whose incorrect LLDP implementations give us the interface mac instead of the chassis mac. Therefore, accept either from the switch. Assume that nautobot always contains the "base" mac address of the switch. When finding the switch in nautobot that corresponds to the MAC address that was reported to us via LLDP, first try the address verbatim, and if that is not present in nautobot, calculate the "base" mac address (subtracting the port number from the MAC address reported by LLDP) and try that instead.
This was failing on certain data but we are not using the returned data anywhere so we can just remove it from the query.
stevekeay
force-pushed
the
ingest-server
branch
from
October 22, 2024 16:11
97a7c5c
to
667249d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP because still need to add yaml and figure out password handling.
The device that gets created in Nautobot looks like the blelow - it has all the info we are accustomed to, except for "U" height and CORE number. The hostname format also looks different.
Sample logs from running this thing: